{% extends 'user/base.html' %}
{% block user_index %}
    <div class="container">
        <div class="col-4 offset-4" style="margin-top: 60px;">
            <h3 class="text-center">添加资源</h3>
            <form action="{% url 'media_add' %}" method="post" enctype="multipart/form-data">
                {% csrf_token %}
                <div class="mb-3">
                    <label class="form-label">题目</label>
                    <input required name="title" type="text" class="form-control">
                </div>
                <div class="mb-3">
                    <label class="form-label">内容</label>
                    <textarea required name="synopsis" class="form-control"></textarea>
                </div>
                <div class="mb-3">
                    <label class="form-label">图片</label>
                    <input required name="photo" type="file" class="form-control">
                </div>
                <div class="text-end" style="margin-top: 40px">
                    <button type="submit" class="btn btn-primary w-100 sta">提交</button>
                </div>

            </form>
        </div>
    </div>
{% endblock %}